﻿* Encoding: UTF-8.
/* Reconsidering Tolerance: Insights from Political Theory and Three Experiments

/* Replication syntax for Study 1

/*Tolerance index items
/*reverse scoring

IF  (banfromstugov= 1) banfromstugov_r=5.
IF  (banfromstugov= 2) banfromstugov_r=4.
IF  (banfromstugov= 3) banfromstugov_r=3.
IF  (banfromstugov= 4) banfromstugov_r=2.
IF  (banfromstugov= 5) banfromstugov_r=1.


IF  (shouldnotputup= 1) shouldnotputup_r=5.
IF  (shouldnotputup= 2) shouldnotputup_r=4.
IF  (shouldnotputup= 3) shouldnotputup_r=3.
IF  (shouldnotputup= 4) shouldnotputup_r=2.
IF  (shouldnotputup= 5) shouldnotputup_r=1.

if (newspapernotpublish = 1) newspapernotpublish_r = 5.
if (newspapernotpublish = 2) newspapernotpublish_r = 4.
if (newspapernotpublish = 3) newspapernotpublish_r = 3.
if (newspapernotpublish = 4) newspapernotpublish_r = 2.
if (newspapernotpublish = 5) newspapernotpublish_r = 1.

Value Labels
scenario1
1 'Republican'
2 'Muslim'
3 'Evangelical Christian'
4 'Atheist'
5 'Anti-Vaccine'.
Execute.

compute tolerance_index = mean(allowspeech, rightexpress, banfromstugov_r, shouldnotputup_r, newspapernotpublish_r).
compute tolerance_index_1 = tolerance_index/5.

compute worried_1 = worried/11.
compute uncomfortable_1 = uncomfortable/11.

variable labels
tolerance_index_1 'Tolerance Index'
worried_1 'Worried'
uncomfortable_1 'Uncomfortable'.


Value labels
treated
0 'Nonconvert'
1 'Convert'.
Execute.

/* Republicans

USE ALL.
COMPUTE filter_$=(scenario1 = 1).
VARIABLE LABELS filter_$ 'scenario1 = 1 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1
  /CRITERIA=CI(.95).

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=Age Income Religiosity Education
  /CRITERIA=CI(.95).

CROSSTABS
  /TABLES=treated BY Gender Ethnicity Party
  /FORMAT=AVALUE TABLES
  /STATISTICS=CHISQ
  /CELLS=COUNT
  /COUNT ROUND CELL.

/* Muslims

USE ALL.
COMPUTE filter_$=(scenario1 = 2).
VARIABLE LABELS filter_$ 'and scenario1 = 2 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1
  /CRITERIA=CI(.95).

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=Age Income Religiosity Education
  /CRITERIA=CI(.95).

CROSSTABS
  /TABLES=treated BY Gender Ethnicity Party
  /FORMAT=AVALUE TABLES
  /STATISTICS=CHISQ
  /CELLS=COUNT
  /COUNT ROUND CELL.

/*  Evamgelical Christians

USE ALL.
COMPUTE filter_$=(scenario1 = 3).
VARIABLE LABELS filter_$ 'study_123 = 1 and scenario1 = 3(FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.
T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1
  /CRITERIA=CI(.95).


T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=Age Income Religiosity Education
  /CRITERIA=CI(.95).

CROSSTABS
  /TABLES=treated BY Gender Ethnicity Party
  /FORMAT=AVALUE TABLES
  /STATISTICS=CHISQ
  /CELLS=COUNT
  /COUNT ROUND CELL.

/* Atheists

USE ALL.
COMPUTE filter_$=(scenario1 = 4).
VARIABLE LABELS filter_$ 'scenario1 = 4 (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.
T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1
  /CRITERIA=CI(.95).

T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=Age Income Religiosity Education
  /CRITERIA=CI(.95).

CROSSTABS
  /TABLES=treated BY Gender Ethnicity Party
  /FORMAT=AVALUE TABLES
  /STATISTICS=CHISQ
  /CELLS=COUNT
  /COUNT ROUND CELL.

/* 5 Anti-vaccine

USE ALL.
COMPUTE filter_$=(scenario1 = 5).
VARIABLE LABELS filter_$ 'scenario1 = 5(FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.
T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1
  /CRITERIA=CI(.95).


T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=Age Income Religiosity Education
  /CRITERIA=CI(.95).

CROSSTABS
  /TABLES=treated BY Gender Ethnicity Party
  /FORMAT=AVALUE TABLES
  /STATISTICS=CHISQ
  /CELLS=COUNT
  /COUNT ROUND CELL.

/*pooled results

FILTER OFF.
USE ALL.
EXECUTE.
T-TEST GROUPS=treated(0 1)
  /MISSING=ANALYSIS
  /VARIABLES=tolerance_index_1 worried_1 uncomfortable_1
  /CRITERIA=CI(.95).

*/ Figure 2. Study 1, Mean Tolerance Index by Scenario and Condition

* Chart Builder.
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=scenario1 MEANCI(tolerance_index_1,
    95)[name="MEAN_tolerance_index_1" LOW="MEAN_tolerance_index_1_LOW"
    HIGH="MEAN_tolerance_index_1_HIGH"] treated MISSING=LISTWISE REPORTMISSING=NO
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: scenario1=col(source(s), name("scenario1"), unit.category())
  DATA: MEAN_tolerance_index_1=col(source(s), name("MEAN_tolerance_index_1"))
  DATA: treated=col(source(s), name("treated"), unit.category())
  DATA: LOW=col(source(s), name("MEAN_tolerance_index_1_LOW"))
  DATA: HIGH=col(source(s), name("MEAN_tolerance_index_1_HIGH"))
  COORD: rect(dim(1,2), cluster(3,0))
  GUIDE: axis(dim(3), label("Scenario"))
  GUIDE: axis(dim(2), label("Mean Tolerance Index"))
  GUIDE: legend(aesthetic(aesthetic.color.interior), label(""))
  GUIDE: text.footnote(label("Error Bars: 95% CI"))
  SCALE: cat(dim(3), include("2.00", "5.00", "3.00", "4.00", "1.00"), sort.values("2.00",
    "5.00", "3.00", "4.00", "1.00"))
  SCALE: linear(dim(2), include(0))
  SCALE: cat(aesthetic(aesthetic.color.interior), include("0", "1"))
  SCALE: cat(dim(1), include("0", "1"))
  ELEMENT: interval(position(treated*MEAN_tolerance_index_1*scenario1), color.interior(treated),
    shape.interior(shape.square))
  ELEMENT: interval(position(region.spread.range(treated*(LOW+HIGH)*scenario1)),
    shape.interior(shape.ibeam))
END GPL.

/* Appendix C. Study 1, Group Affect

variable labels
Republicans 'Republicans'
Muslims 'Muslims'
EC 'Evangelical Christians'
Atheists 'Those who are against all churches and religions'
AntiVaccine 'The Anti-Vaccine Movement'.
Execute.

* Chart Builder.
GGRAPH
  /GRAPHDATASET NAME="graphdataset" VARIABLES=MEANCI(Republicans, 95) MEANCI(Muslims, 95)
    MEANCI(EC, 95) MEANCI(Atheists, 95) MEANCI(Antivaccine, 95) MISSING=LISTWISE REPORTMISSING=NO
    TRANSFORM=VARSTOCASES(SUMMARY="#SUMMARY" INDEX="#INDEX" LOW="#LOW" HIGH="#HIGH")
  /GRAPHSPEC SOURCE=INLINE.
BEGIN GPL
  SOURCE: s=userSource(id("graphdataset"))
  DATA: SUMMARY=col(source(s), name("#SUMMARY"))
  DATA: INDEX=col(source(s), name("#INDEX"), unit.category())
  DATA: LOW=col(source(s), name("#LOW"))
  DATA: HIGH=col(source(s), name("#HIGH"))
  GUIDE: axis(dim(2), label("Very Unfavorable                                     Very Favorable"))
  GUIDE: text.footnote(label("Error Bars: 95% CI"))
  SCALE: cat(dim(1), include("3", "0", "1", "4", "2"))
  SCALE: linear(dim(2), min(0), max(100))
  ELEMENT: interval(position(INDEX*SUMMARY), shape.interior(shape.square))
  ELEMENT: interval(position(region.spread.range(INDEX*(LOW+HIGH))), shape.interior(shape.ibeam))
END GPL.



